<template>
  <div>
    <h1>form数据问题</h1>
    <form>
      <input type="text" v-model="user_name" /><br />
      <input type="text" v-model="password" /><br />
      <input type="submit" value="提交" @click.prevent="celMsg" />
    </form>
  </div>
</template>

<script>
import { testFormPost } from "../ajax/api";
export default {
  name: "",
  props: [""],
  data() {
    return {
      user_name: "",
      password: ""
    };
  },

  components: {},

  computed: {},

  beforeMount() {},

  mounted() {},

  methods: {
    celMsg() {
      const obj = {};
      obj.user_name = this.user_name;
      obj.password = this.password;
      testFormPost("/login", obj);
    }
  },

  watch: {}
};
</script>
<style lang="" scoped></style>
